package com.springboot.dubbo.consumer.controller;

import com.springboot.dubbo.consumer.service.UserConsumerService;
import com.springboot.dubbo.provider.api.bean.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: guodong
 * @Date: 2020/10/15 14:45
 * @Version: 1.0
 * @Description:
 */
@Controller
@RestController
public class UserController {


    @Autowired
    UserConsumerService userConsumerService;


    @GetMapping("getUserById")
    @ResponseBody
    public User getUserById(){
        return userConsumerService.getUserById(1L);
    }





}
